1. Field of the Invention
The invention relates to a method for time-shared processing of a sequence of principal data words having a known constant frequency and a sequence of secondary data words having a lower frequency, in which the processing of each principal data word requires a shorter duration than the period of the principal data words. The invention also relates to apparatus for carrying out such method.
2. Description of the Related Art
In particular, a method of this type is carried out by a data processor which processes sample values, digitized as data words, of analog signals or sample values of signals which are already digitally present, which signals are time-dependent. The individual sample values of a signal are processed according to the same program in each case. One particular example of this is the processing of digitized audio signals, derived for instance from a compact disc CD storage medium. Since each of the sample values are subjected to the same algorithm, in the form of an application program in the data processor, the number of instructions which can be executed within a sampling period and the extent of the instructions themselves represent a measure of the performance of the data processor.
In the foregoing case, primary functions, such as volume, balance and treble and bass settings, for example, are executed in the data processor in a foreground program which operates in the case of the CD at a sampling frequency of 44.1 kHz. There are also additional functions in audio systems, which can be referred to as secondary functions owing to their lesser requirements in terms of time. The rate of change of the signals for these secondary functions is considerably less than for the primary functions, so that it is possible to process the former in time gaps which remain within or at the end of a sampling period during the execution of a foreground program for a primary function. An example of such secondary functions are measures for decoding stereo/mono switch-overs or station identifiers in audio systems.
To be able to execute the background programs, it is, therefore, necessary that the sampling period of the foreground program is not completely occupied by instructions of such program. Since the space available for the background program within the sampling period of the foreground program is usually limited, the background program must be divided into a number of suitable sub-programs, each such sub-program then being processed in one of the successive sampling periods following each execution of the foreground program. A start program branch for processing the corresponding sub-program of the background program is carried out at the end of each execution of the foreground program, and a return program branch is carried out at the start of the following execution of the foreground program. The latter is frequently controlled by a corresponding synchronization signal, so that a wait loop exists at the end of the background sub-program to wait for this synchronization signal.
This results in an unfavorable time utilization of the data processor. Moreover, each program branch requires that a number of commands must be provided, for management of the branch addresses in particular, which increases program execution time. This increases proportionately the smaller the background sub-programs are.